From 69551c6e2500ba94bb66e807541ae7408d7ade15 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Mon, 17 Feb 2025 16:47:15 +0100 Subject: [PATCH] Disable the option to select an update channel when server has a valid subscription. Signed-off-by: Camila Ayres --- src/gui/generalsettings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/generalsettings.cpp b/src/gui/generalsettings.cpp index 843be0dd5..d6aec9821 100644 --- a/src/gui/generalsettings.cpp +++ b/src/gui/generalsettings.cpp @@ -327,12 +327,13 @@ void GeneralSettings::loadMiscSettings() void GeneralSettings::loadUpdateChannelsList() { ConfigFile cfgFile; const auto validUpdateChannels = cfgFile.validUpdateChannels(); - if (_currentUpdateChannelList.isEmpty() || (_currentUpdateChannelList != validUpdateChannels && !cfgFile.serverHasValidSubscription())) { + if (_currentUpdateChannelList.isEmpty() || _currentUpdateChannelList != validUpdateChannels){ _currentUpdateChannelList = validUpdateChannels; _ui->updateChannel->clear(); _ui->updateChannel->addItems(_currentUpdateChannelList); const auto currentUpdateChannelIndex = _currentUpdateChannelList.indexOf(cfgFile.currentUpdateChannel()); _ui->updateChannel->setCurrentIndex(currentUpdateChannelIndex != -1 ? currentUpdateChannelIndex : 0); + _ui->updateChannel->setDisabled(cfgFile.serverHasValidSubscription()); connect(_ui->updateChannel, &QComboBox::currentTextChanged, this, &GeneralSettings::slotUpdateChannelChanged); } } -- 2.30.2